<html>
<head>
<title>Top Customer</title>
<style type="text/css">
body {
	font-family:verdana,arial,sans-serif;
	font-size:10pt;
	margin:30px;
	background-color:#ffcc00;
	}
</style>

</head>
<body>
<h1>Top 5 Customer Last Month</h1>
<br/>

<form name= "topcustomers" action="topcustomers_action.php" method="post">

<?php
$username="bsc353_4";
$password="sonbeans";
$database="bsc353_4";

mysql_connect("clipper.encs.concordia.ca",$username,$password) or die ("Unable to connect to database");

@mysql_select_db($database) or die ("Unable to select database");

$branchquery= "Select branchID from StoreBranch";

$allbranch=mysql_query($branchquery) or die ("Query did not work");

$numbranch= mysql_numrows($allbranch);

mysql_close();

echo"Select Store Branch ID: ";
echo"<select name='branchid'>";
echo"<option>Select One</option>";
$i=0;
while($i<$numbranch)
    {
    $value=mysql_result($allbranch,$i,"branchID");
    echo "<option>$value</option>";
    ++$i;
    }   
echo"<option>All Of MBS</option>";
echo"</select><br /><br />";

?>

<input type="submit" value="Display">  
       
</form> 


</body>
</html>